const http = uni.$u.http
import { baseUrl } from "../common/http.interceptor";

export default {
    /**
     * 用户
     */
    uploadImage: baseUrl + '/upload/file',
    getUserInfo: (id) => http.get('/user/' + id),
    updateUser: (id, data) => http.put('/user/' + id, data),
    register: (data) => http.post('/user/register', data),
    login: (data) => http.post('/user/login', data),
    getBannerList: (params) => http.get('/banner/list', params),
    getProductCategoryList: (params) => http.get('/productCategory/list', params),
    getProductList: (params) => http.get('/product', params),
    getProductDetail: (id) => http.get(`/product/${id}`),
    // 提交申请
    submitApplication: (data) => http.post('/product-application', data),
    getProductApplicationList: (params) => http.get('/product-application', params),
}
